#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
    int removeElement(vector<int>& nums, int val) {
        int left=0;
        for(int right=0;right<nums.size();right++)
        {
            if(nums[right]!=val)
            {
                nums[left++]=nums[right];
              
            }
        }
        return left;
    }
};
int main()
{
    Solution s1;
    vector<int>nums({3});
    cout<<s1.removeElement(nums,3);
}